/*!  \file  FormSVD.h
 *	  \brief  
 * 
 *   \details   details
 *   \author    Yordan Madzhunkov German Research School for Simulation Sciences GmbH
 *   \version   1.0
 *   \date      09/29/2013 10:47:54 AM
 *   \copyright GNU Public License.
 */
#pragma once

#include "ImplementationFactory.h"
#include "UnitTester.h"

class FormSVD : public Implementation {
	// interface for forming computing the full SVD, from 
	// 2 reflectors ( computed in reduction phase )
	// 2 orthogonal matrices ( computed in BiSVD )
public: 
	FormSVD(const char * name_);
	virtual ~FormSVD(){};
	virtual void compute( Matrix & Q, Matrix & P, Matrix & U, Matrix & V ) = 0;
	virtual bool setNumberOfThreads(const int nThreads_);
protected:
	bool checkInput(Matrix & Q, Matrix & P, Matrix & U, Matrix & V) const; 
};

class ORGBR : public FormSVD {
public: 
	ORGBR() ; 
	virtual ~ORGBR(){}; 
	virtual void compute( Matrix & Q, Matrix & P, Matrix & U, Matrix & V );
};
class ORMBR : public FormSVD {
public: 
	ORMBR() ; 
	virtual ~ORMBR(){}; 
	virtual void compute( Matrix & Q, Matrix & P, Matrix & U, Matrix & V );
};

UNITTEST2(FormSVDUnitTest, FormSVD, form);
